import request from '@/utils/request'

// 查询离职列表
export function listEmpl_leave(query) {
  return request({
    url: '/ehr/empl_leave/list',
    method: 'get',
    params: query
  })
}

// 查询离职详细
export function getEmpl_leave(partyId) {
  return request({
    url: '/ehr/empl_leave/' + partyId,
    method: 'get'
  })
}

// 新增离职
export function addEmpl_leave(data) {
  return request({
    url: '/ehr/empl_leave',
    method: 'post',
    data: data
  })
}

// 修改离职
export function updateEmpl_leave(data) {
  return request({
    url: '/ehr/empl_leave',
    method: 'put',
    data: data
  })
}

// 删除离职
export function delEmpl_leave(partyId) {
  return request({
    url: '/ehr/empl_leave/' + partyId,
    method: 'delete'
  })
}

// 提交离职审批
export function approvalEmpl_leave(data) {
  return request({
    url: '/ehr/empl_leave/approval',
    method: 'post',
    data: data
  })
}
